Skip to main content

Multiple Element Have the Same ClassName

Class Name Locator – Multiple Elements

In this example, we are learning how to deal with multiple elements having the same class name. This setup is useful for practicing Selenium WebDriver methods like findElements(By.className()).

Input element with class inputtext.
Another element using the same class name.
Third input with identical class attribute.